#
# EXAMPLE MAKEFILE FOR EMSTEST TESTER/EXAMPLE PROGRAM FOR EMSIF
# MICROSOFT C
# 06/24/93
#
#   This is an example makefile for Microsoft C, to make the EMSTEST tester/
# example program in any of the six supported memory models. It is compatible
# with the NMAKE utility provided with the compiler. As supplied, it is set
# up for Microsoft C 7.0 and 8.0 (part of Visual C++ 1.0). To reconfigure for
# earlier compilers, three changes may be required. First, check whether your
# version of the compiler has the library functions _fmemcmp() and _fmemset().
# If it does not, add "/DNO_FFUNC" to the line that begins "CFLAGS". Second,
# check whether your version of the compiler supports in-line assembly code.
# If it does, no changes should be necessary. If it does not, or you do not
# wish to use the in-line assembly code (even though it improves execution
# speed significantly), simply remove "/DINLINE_ASM" from the line that
# begins "CFLAGS". Third, due to a change in NMAKE between MSC 6.0a and 7.0,
# all the instances of "$@" below must be changed to "$<" to be compatible
# with the MSC 6.0a NMAKE (and presumably earlier NMAKEs).
#
#   Before using this makefile, make sure that the Microsoft NMAKE utility
# and the appropriate command-line compiler and linker are in your path,
# and that the necessary environment variables (INCLUDE and LIB) are set
# appropriately. The four source files (EMSTEST.C, EMSTEST2.C, EMSTEST3.C,
# and TESTUTIL.C), the header files (EMSTEST.H, TESTUTIL.H, and EMSIF.H), and
# the appropriate library or libraries (EMSIF*.LIB) should all be in the
# current directory.
#
#    To use the makefile, type "nmake /f exmakems target", where 'target' is
# one or more of tiny, small, medium, compact, large, or huge separated by
# spaces. For example, "nmake /f exmakems tiny" would make the tiny-model
# example and "nmake /f exmakems small large" would make the small- and
# large-model examples. "nmake /f exmakems" will make the test programs
# for all memory models.
#


CC	= cl
CFLAGS	= /c /DINLINE_ASM

LINK	= link
LF	=


all:		tiny small medium compact large huge

tiny:		temststa temststb temststc

small:		semstest

medium:		memstest

compact:	cemststa cemststb cemststc

large:		lemstest

huge:		hemstest


temststa.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AT /DPASS1 /Fo$@ emstest.c

temststb.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AT -DPASS2 /Fo$@ emstest.c

temststc.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AT -DPASS3 /Fo$@ emstest.c

semstest.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AS /Fo$@ emstest.c

memstest.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AM /Fo$@ emstest.c

cemststa.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AC /DPASS1 /Fo$@ emstest.c

cemststb.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AC /DPASS2 /Fo$@ emstest.c

cemststc.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AC /DPASS3 /Fo$@ emstest.c

lemstest.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AL /Fo$@ emstest.c

hemstest.obj:	emstest.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AH /Fo$@ emstest.c

temstst2.obj:	emstest2.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AT /Fo$@ emstest2.c

semstst2.obj:	emstest2.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AS /Fo$@ emstest2.c

memstst2.obj:	emstest2.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AM /Fo$@ emstest2.c

cemstst2.obj:	emstest2.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AC /Fo$@ emstest2.c

lemstst2.obj:	emstest2.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AL /Fo$@ emstest2.c

hemstst2.obj:	emstest2.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AH /Fo$@ emstest2.c

temstst3.obj:	emstest3.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AT /Fo$@ emstest3.c

semstst3.obj:	emstest3.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AS /Fo$@ emstest3.c

memstst3.obj:	emstest3.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AM /Fo$@ emstest3.c

cemstst3.obj:	emstest3.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AC /Fo$@ emstest3.c

lemstst3.obj:	emstest3.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AL /Fo$@ emstest3.c

hemstst3.obj:	emstest3.c emstest.h testutil.h
	$(CC) $(CFLAGS) /AH /Fo$@ emstest3.c

ttstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) /AT /Fo$@ testutil.c

ststutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) /AS /Fo$@ testutil.c

mtstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) /AM /Fo$@ testutil.c

ctstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) /AC /Fo$@ testutil.c

ltstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) /AL /Fo$@ testutil.c

htstutil.obj:	testutil.c testutil.h
	$(CC) $(CFLAGS) /AH /Fo$@ testutil.c


temststa:	temststa.obj ttstutil.obj emsifs.lib
	$(LINK) $(LF) /ST:0x800 temststa ttstutil, temststa, , emsifs ;

temststb:	temststb.obj temstst2.obj ttstutil.obj emsifs.lib
	$(LINK) $(LF) /ST:0x800 temststb temstst2 ttstutil, temststb, , emsifs ;

temststc:	temststc.obj temstst3.obj ttstutil.obj emsifs.lib
	$(LINK) $(LF) /ST:0x800 temststc temstst3 ttstutil, temststc, , emsifs ;

semstest:	semstest.obj semstst2.obj semstst3.obj ststutil.obj emsifs.lib
	$(LINK) $(LF) semstest semstst2 semstst3 ststutil, semstest, , emsifs ;

memstest:	memstest.obj memstst2.obj memstst3.obj mtstutil.obj emsifm.lib
	$(LINK) $(LF) memstest memstst2 memstst3 mtstutil, memstest, , emsifm ;

cemststa:	cemststa.obj ctstutil.obj emsifc.lib
	$(LINK) $(LF) cemststa ctstutil, cemststa, , emsifc ;

cemststb:	cemststb.obj cemstst2.obj ctstutil.obj emsifc.lib
	$(LINK) $(LF) cemststb cemstst2 ctstutil, cemststb, , emsifc ;

cemststc:	cemststc.obj cemstst3.obj ctstutil.obj emsifc.lib
	$(LINK) $(LF) cemststc cemstst3 ctstutil, cemststc, , emsifc ;

lemstest:	lemstest.obj lemstst2.obj lemstst3.obj ltstutil.obj emsifl.lib
	$(LINK) $(LF) lemstest lemstst2 lemstst3 ltstutil, lemstest, , emsifl ;

hemstest:	hemstest.obj hemstst2.obj hemstst3.obj htstutil.obj emsifh.lib
	$(LINK) $(LF) hemstest hemstst2 hemstst3 htstutil, hemstest, , emsifh ;

